Integrand size = 39, antiderivative size = 137 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {(4 A b+4 a B+3 b C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {(3 a A+2 b B+2 a C) \tan (c+d x)}{3 d}+\frac {(4 A b+4 a B+3 b C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {(b B+a C) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {4161, 4132, 3853, 3855, 4131, 3852, 8} \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {(4 a B+4 A b+3 b C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {\tan (c+d x) (3 a A+2 a C+2 b B)}{3 d}+\frac {\tan (c+d x) \sec (c+d x) (4 a B+4 A b+3 b C)}{8 d}+\frac {(a C+b B) \tan (c+d x) \sec ^2(c+d x)}{3 d}+\frac {b C \tan (c+d x) \sec ^3(c+d x)}{4 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3853
Rule 3855
Rule 4131
Rule 4132
Rule 4161
Rubi steps \begin{align*} \text {integral}& = \frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} \int \sec ^2(c+d x) \left (4 a A+(4 A b+4 a B+3 b C) \sec (c+d x)+4 (b B+a C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} \int \sec ^2(c+d x) \left (4 a A+4 (b B+a C) \sec ^2(c+d x)\right ) \, dx+\frac {1}{4} (4 A b+4 a B+3 b C) \int \sec ^3(c+d x) \, dx \\ & = \frac {(4 A b+4 a B+3 b C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {(b B+a C) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{3} (3 a A+2 b B+2 a C) \int \sec ^2(c+d x) \, dx+\frac {1}{8} (4 A b+4 a B+3 b C) \int \sec (c+d x) \, dx \\ & = \frac {(4 A b+4 a B+3 b C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {(4 A b+4 a B+3 b C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {(b B+a C) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {(3 a A+2 b B+2 a C) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d} \\ & = \frac {(4 A b+4 a B+3 b C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {(3 a A+2 b B+2 a C) \tan (c+d x)}{3 d}+\frac {(4 A b+4 a B+3 b C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {(b B+a C) \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {b C \sec ^3(c+d x) \tan (c+d x)}{4 d} \\ \end{align*}
Time = 0.48 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.73 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 (4 A b+4 a B+3 b C) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (3 (4 A b+4 a B+3 b C) \sec (c+d x)+6 b C \sec ^3(c+d x)+8 \left (3 b B+3 a (A+C)+(b B+a C) \tan ^2(c+d x)\right )\right )}{24 d} \]
[In]
[Out]
Time = 1.14 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.99
method | result | size |
parts | \(\frac {\left (A b +a B \right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}-\frac {\left (B b +C a \right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {C b \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}+\frac {a A \tan \left (d x +c \right )}{d}\) | \(136\) |
derivativedivides | \(\frac {a A \tan \left (d x +c \right )+a B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-C a \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A b \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C b \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(174\) |
default | \(\frac {a A \tan \left (d x +c \right )+a B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-C a \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A b \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B b \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C b \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(174\) |
parallelrisch | \(\frac {-12 \left (\left (A +\frac {3 C}{4}\right ) b +a B \right ) \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 \left (\left (A +\frac {3 C}{4}\right ) b +a B \right ) \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (64 B b +48 a \left (A +\frac {4 C}{3}\right )\right ) \sin \left (2 d x +2 c \right )+\left (\left (24 A +18 C \right ) b +24 a B \right ) \sin \left (3 d x +3 c \right )+\left (16 B b +24 a \left (A +\frac {2 C}{3}\right )\right ) \sin \left (4 d x +4 c \right )+24 \sin \left (d x +c \right ) \left (\left (A +\frac {11 C}{4}\right ) b +a B \right )}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(214\) |
norman | \(\frac {-\frac {\left (8 a A -4 A b -4 a B +8 B b +8 C a -5 C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (8 a A +4 A b +4 a B +8 B b +8 C a +5 C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (72 a A -12 A b -12 a B +40 B b +40 C a +9 C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {\left (72 a A +12 A b +12 a B +40 B b +40 C a -9 C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {\left (4 A b +4 a B +3 C b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {\left (4 A b +4 a B +3 C b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(241\) |
risch | \(-\frac {i \left (12 A b \,{\mathrm e}^{7 i \left (d x +c \right )}+12 a B \,{\mathrm e}^{7 i \left (d x +c \right )}+9 C b \,{\mathrm e}^{7 i \left (d x +c \right )}-24 A a \,{\mathrm e}^{6 i \left (d x +c \right )}+12 A b \,{\mathrm e}^{5 i \left (d x +c \right )}+12 B a \,{\mathrm e}^{5 i \left (d x +c \right )}+33 C b \,{\mathrm e}^{5 i \left (d x +c \right )}-72 A a \,{\mathrm e}^{4 i \left (d x +c \right )}-48 B b \,{\mathrm e}^{4 i \left (d x +c \right )}-48 C a \,{\mathrm e}^{4 i \left (d x +c \right )}-12 A b \,{\mathrm e}^{3 i \left (d x +c \right )}-12 a B \,{\mathrm e}^{3 i \left (d x +c \right )}-33 C b \,{\mathrm e}^{3 i \left (d x +c \right )}-72 a A \,{\mathrm e}^{2 i \left (d x +c \right )}-64 B b \,{\mathrm e}^{2 i \left (d x +c \right )}-64 C a \,{\mathrm e}^{2 i \left (d x +c \right )}-12 A b \,{\mathrm e}^{i \left (d x +c \right )}-12 a B \,{\mathrm e}^{i \left (d x +c \right )}-9 C b \,{\mathrm e}^{i \left (d x +c \right )}-24 a A -16 B b -16 C a \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A b}{2 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a B}{2 d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A b}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a B}{2 d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}\) | \(401\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.15 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (4 \, B a + {\left (4 \, A + 3 \, C\right )} b\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (4 \, B a + {\left (4 \, A + 3 \, C\right )} b\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left ({\left (3 \, A + 2 \, C\right )} a + 2 \, B b\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (4 \, B a + {\left (4 \, A + 3 \, C\right )} b\right )} \cos \left (d x + c\right )^{2} + 6 \, C b + 8 \, {\left (C a + B b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
\[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.59 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a + 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b - 3 \, C b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, B a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, A b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, A a \tan \left (d x + c\right )}{48 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 428 vs. \(2 (127) = 254\).
Time = 0.31 (sec) , antiderivative size = 428, normalized size of antiderivative = 3.12 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (4 \, B a + 4 \, A b + 3 \, C b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (4 \, B a + 4 \, A b + 3 \, C b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (24 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 12 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 72 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 40 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 40 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 12 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
[In]
[Out]
Time = 20.03 (sec) , antiderivative size = 260, normalized size of antiderivative = 1.90 \[ \int \sec ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {A\,b}{2}+\frac {B\,a}{2}+\frac {3\,C\,b}{8}\right )}{2\,A\,b+2\,B\,a+\frac {3\,C\,b}{2}}\right )\,\left (A\,b+B\,a+\frac {3\,C\,b}{4}\right )}{d}-\frac {\left (2\,A\,a-A\,b-B\,a+2\,B\,b+2\,C\,a-\frac {5\,C\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (A\,b-6\,A\,a+B\,a-\frac {10\,B\,b}{3}-\frac {10\,C\,a}{3}-\frac {3\,C\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (6\,A\,a+A\,b+B\,a+\frac {10\,B\,b}{3}+\frac {10\,C\,a}{3}-\frac {3\,C\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-2\,A\,a-A\,b-B\,a-2\,B\,b-2\,C\,a-\frac {5\,C\,b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
[In]
[Out]